package com.android.hedgehog.puzzles;

import android.graphics.Color;

import com.android.hedgehog.Assets;
import com.android.hedgehog.GameScreen;
import com.android.hedgehog.framework.Graphics;

public class SeesawScreen extends GameScreen {
	Graphics graphics;
	SeesawBoard board;
	private enum GameState {
		Ready, Running, Input, Result
	}

	public SeesawScreen(Graphics g, int difficulty) {
		graphics = g;
		board = new SeesawBoard(10);
	}

	@Override
	public int update(int x, int y, int score, double time) {
		return 0;
	}

	@Override
	public void present() {
		graphics.drawPixmap(Assets.lightyellowbackground, 0, 0);
		graphics.drawPixmap(Assets.board, 20, 160);
		// graphics.drawPixmap(Assets.blocks, 25, 170, 0, 0, 30, 30);
		for (int i = 0; i < board.totalBoxes; i++) {
			if (board.blocks[i].xPos < 3) {
				graphics.drawPixmap(Assets.blocks,
						25 + (40 * board.blocks[i].xPos),
						130 - (board.blocks[i].yPos * 30), 0, 0, 30, 30);
			} else {
				graphics.drawPixmap(Assets.blocks,
						65 + (40 * board.blocks[i].xPos),
						130 - (board.blocks[i].yPos * 30), 0, 0, 30, 30);
			}
		}

		for (int i = 0; i < board.totalBoxes + 1; i++)
			graphics.drawText(board.test[i], 160, 240 + (i * 15), 10,
					Color.BLACK);
	}

}
